<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      >
    <ui:composition template="/secured/template/common/commonLayout.xhtml">
        <ui:define name="commonHeader" ></ui:define>

        <ui:define name="content">
            <h:form>
                <CENTER><h1>ATM ADMIN DashBoard</h1></CENTER>
                <center>
                    
                    <p:panel header="Incidents Map:" footer="" >  
                        <p:gmap center="36.890257,30.707417" zoom="13" type="HYBRID" model="#{admin.ivm.map.advancedModel}" style="width:600px;height:400px"> 
                            <p:ajax event="overlaySelect" listener="#{admin.ivm.map.onMarkerSelect}" />
                            <p:gmapInfoWindow>
                                <p:outputPanel style="text-align:center;display:block;margin:auto:">
                                    <h:outputLabel for="routeTitle" value="any thing you want" />
                                    <br />
                                    <h:outputText value="#{admin.ivm.map.marker.title}" />
                                    <h:outputText value="incidents info" />
                                </p:outputPanel>
                            </p:gmapInfoWindow>
                        </p:gmap>
                    </p:panel> 
                    
                </center>
                <p:panel header="List Incidents:" footer=""> 
                    <p:dataTable 
                        id="basic" 
                        var="ticket" 
                        value="#{admin.incidents}"
                        paginator="true" 
                        rows="10"  
                        paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"  
                        rowsPerPageTemplate="5,10,15" 
                        >  
                    <f:facet name="header">  
                        List Tickets available: 
                    </f:facet>                     
                    <p:column id="h">   
                        <f:facet name="header">  
                            List Tickets available: 
                        </f:facet>  
                        <h:outputText value="#{ticket.idTicket}"/> 
                    </p:column>   
                    <p:column id="c1">  
                        <f:facet name="header">  
                            Ticket status
                        </f:facet>  
                        <h:outputText value="#{ticket.status}" />  
                    </p:column>   
                    <p:column id="c2">  
                        <f:facet name="header">  
                            Ticket status
                        </f:facet>  
                        <h:outputText value="#{ticket.startTime}" />   
                    </p:column>                           
                    <p:column id="c3">  
                        <f:facet name="header">  
                            Incident subject
                        </f:facet>  
                        <h:outputText value="#{ticket.incident.incident_subject}" />   
                    </p:column>  
                    <p:column id ="c4">  
                        <f:facet name="header">   
                            Incident degree  
                        </f:facet>  
                        <h:outputText value="#{ticket.incident.incident_degree}" />   
                    </p:column>  
                    <p:column id="c5">  
                        <f:facet name="header">   
                            Incident Time Estimated  
                        </f:facet>  
                        <h:outputText value="#{ticket.incident.incident_time_estimated}" />   
                    </p:column>  
                </p:dataTable>  
                </p:panel>
            </h:form>
        </ui:define> 
        <ui:define name="commonFooter"/>   
    </ui:composition> 
</html>